import time

from selenium import webdriver

# 实例化配置类
options = webdriver.ChromeOptions()

# 准备配置项
user_data_dir = r'--user-data-dir=C:\Users\戴尔\AppData\Local\Google\Chrome\User Data'

# 添加参数
options.add_argument(user_data_dir)

# 打开浏览器(设置options),请求目标网址
driver = webdriver.Chrome(options=options)
driver.get('https://gitee.com/dashboard')

time.sleep(5)
driver.quit()
